/*================================================================
*   Copyright (C) 2019 Guangzhou Firefly Ltd. All rights reserved.
*   
*   文件名称：str_reverse.c
*   创 建 者：luhuadong
*   创建日期：2019年10月16日
*   描    述：字符串反转
*
================================================================*/


#include <stdio.h>
#include <string.h>

#define WITHOUT_TMP


int main(void)
{
	char str[128];
#ifndef WITHOUT_TMP
	char tmp;
#endif

	scanf("%s", str);

	int i = 0;
	int j = strlen(str) - 1;

	while(j > i) {
	
#ifdef WITHOUT_TMP
		str[i] = str[i] + str[j];
		str[j] = str[i] - str[j];
		str[i] = str[i] - str[j];
#else
		tmp = str[i];
		str[i] = str[j];
		str[j] = tmp;
#endif
		i++;
		j--;
	}

	printf("%s\n", str);

	return 0;
}
